1. Field of the Invention
The present invention relates to an imaging apparatus, an imaging method, a program, a storage medium, and an integrated circuit for estimating distance information for each pixel of a captured image (the distance between a subject corresponding to the pixel and an image capturing position (camera installation position) in a three-dimensional space) using illumination.
2. Description of the Related Art
With the widespread of digital single-reflex cameras, many photographers enjoy expressing distance in their photographs. For such photographic expressions using distance, photographers may for example defocus and blur the background of an image by setting a faster shutter speed and a larger aperture to decrease the depth of field. However, compact digital cameras and video cameras have limitations in their lens sizes. With small lenses of compact digital cameras and video cameras, photographers cannot have satisfactory distance expressions in their photographs. If a technique for easily measuring distances is available, even compact digital cameras and video cameras will produce “desirable blur”, which is comparable to blur produced by single-reflex cameras, by emulating blur that is produced by lenses based on the measured distances.
Therefore, the demands for cameras that can easily measure distances (distance information) are high. Moreover, the distance information has many other applications.
One technique known in the art for measuring distances is to estimate a distance using a plurality of cameras (stereo camera technique). An imaging apparatus that employs the stereo camera technique forms images of a subject using two cameras. The imaging apparatus calculates distances based on the principle of three-point measurements using differences (parallaxes) between subject points of the captured two images.
However, the imaging apparatus that employs the stereo camera technique is required to use a plurality of lenses. Moreover, such lenses are required to be arranged at sufficiently large intervals. It is unrealistic to apply the stereo camera technique to compact cameras.
Another technique known in the art for measuring distances is the time-of-flight (TOF) technique. An imaging apparatus that employs the TOF technique illuminates a subject with light, such as infrared light, and measures the time required by the light to travel back to the imaging apparatus. Based on the measured time, the imaging apparatus estimates the distance between the imaging apparatus and the subject corresponding to each pixel of the captured image (distance between the imaging apparatus and the subject in a three-dimensional space).
However, the imaging apparatus that employs the TOF technique is required to include special devices, such as an infrared light-emitting diode (LED) and a special charge-coupled device (CCD). The need for such special devices increases the size of the imaging apparatus. In the same manner as for the stereo camera technique, it is unrealistic to apply the TOF technique to compact cameras.
Another technique for measuring distances is to estimate the distance between a camera and a subject using a flash light illumination unit, which is the standard equipment of almost all cameras (imaging apparatuses) (see, for example, Patent Citation 1).
A conventional imaging apparatus (image processing apparatus) described in Patent Citation 1 estimates the distance between the imaging apparatus to the subject corresponding to each pixel of the captured image using the attenuation characteristic of the flash light over distance. The imaging apparatus obtains an image formed with the flash light (that attenuates in inverse proportion to the distance squared) based on a difference between the two images captured with and without the flash light. The apparatus divides the image formed with the flash light by an estimated value of the reflectance of each pixel of the subject in the captured image to calculate an estimated value of the subject distance. Among the pixels values of the image captured without flash light, each of which is used as the estimated value of the reflectance, pixel values 0 are replaced with pixel values 1 (to avoid division by zero).
Patent Citation 1: Japanese Unexamined Patent Publication No. 2001-352440